<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ page import="java.util.List" %>   
<%@ page import="java.util.HashMap" %>  
<%@ page import="com.cjx.util.GetData" %>
<%@ page isELIgnored="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>统计情况</title>
<style>
#topdiv{margin:0 auto;border:0px solid #000;width:500px;height:50px;line-height:40px;margin-top: 25px} 
#infodiv{margin:0 auto;border:0px solid #000;width:500px;height:50px;line-height:40px;margin-top: 25px} 
#detaildiv{margin:0 auto;border:0px solid #000;width:500px;height:50px;line-height:40px;margin-top: 25px} 
#bottomdiv{margin:0 auto;border:0px solid #000;width:500px;height:50px;line-height:40px;margin-top: 25px;align:center} 
table{
	border-collapse: collapse;
	width:500px;
	text-align:center
}
th{
border: 1px solid #666666;
}
td{
border: 1px solid #666666;
}
.closetag{
position:relative;
top:10px;
width:80px;
background-color:#00BFFF;
}
</style>

</head>
<%
GetData gd = new GetData();
List<HashMap> list = gd.getStaistics(request.getParameter("roundid"));
int totalgroup = Integer.parseInt(list.get(0).get("GROUPS").toString())+Integer.parseInt(list.get(1).get("GROUPS").toString())+Integer.parseInt(list.get(2).get("GROUPS").toString());

%>
<body>
<form id="totalinfo" action="../WebTest" method="post">
<div id="topdiv">
<h1>历史记录</h1>
</div>
<div id="bottomdiv">
<input class="closetag" type="submit" value="关闭">&nbsp;&nbsp;
</div>
	
<div id="infodiv">
<h2>统计数据——玩了<%=totalgroup%>局</h2>
</div>
<table border="1"  align="center" valign="center">
<thead>
<tr  style='background-color:#00BFFF'>
<td>姓名</td>
<td>总得分</td>
<td>叫地主次数</td>
</tr>
</thead>
<tbody>
<tr>
<td>
<%=list.get(0).get("NAME")%>
</td>
<td>
<%=list.get(0).get("SCORE")%>
</td>
<td>
<%=list.get(0).get("GROUPS")%>
</td>
</tr>
<tr>
<td>
<%=list.get(1).get("NAME")%>
</td>
<td>
<%=list.get(1).get("SCORE")%>
</td>
<td>
<%=list.get(1).get("GROUPS")%>
</td>
</tr>
<tr>
<td>
<%=list.get(2).get("NAME")%>
</td>
<td>
<%=list.get(2).get("SCORE")%>
</td>
<td>
<%=list.get(2).get("GROUPS")%>
</td>
</tr>
</tbody>
</table>
</br>
<div id="detaildiv">
<h2>详细信息</h2>
</div>
<table  id=table1  align="center" valign="center">
<thead>
<tr  style='background-color:yellow'>
<td>序号</td>
<td>地主</td>
<td>赢家</td>
<td>叫分</td>
<td>炸弹数</td>
<td>得分</td>
</tr>
</thead>
<tbody>
<%
List<HashMap> lists = gd.getGroupList(request.getParameter("roundid"));
if(lists.size()>0){
for(int i=0;i<lists.size();i++){
%>
<tr>
<input id="groupid" type="hidden" value=<%=lists.get(i).get("PK")%>>
<td><%=i+1%></td>
<td><%=lists.get(i).get("LANDLORD")%></td>
<td><%=lists.get(i).get("WINNER")%></td>
<td><%=lists.get(i).get("SCORE")%></td>
<td><%=lists.get(i).get("BOMB")%></td>
<td><%=lists.get(i).get("LANDLORDSCORE")%></td>
</tr>
<%
}
}
%>
<tbody>  
</table>
</form>
</body>
</html>